package com.zeng.plugin.util;

public class HumpStringUtil {

    public static String humpStringHandle(String nohump,String split) {
        if (nohump == null) {
            return null;
        }
        StringBuilder stringBuilder = new StringBuilder(nohump);
        stringBuilder.setCharAt(0, nohump.toUpperCase().charAt(0));
        int position = stringBuilder.indexOf(split);

        while (position >= 0) {
            stringBuilder.delete(position,position+1);
            char ch = stringBuilder.charAt(position);
            if (ch > 90) {
                ch = (char) (ch - 32);
            }
            stringBuilder.setCharAt(position, ch);
            position = stringBuilder.indexOf(split);

        }

        return stringBuilder.toString();

    }
}
